import request from "@/utils/request.js";

const recordBasePath = "/recordHome"
const checkBasePath = "/checkApplication"

export function getRegistPage(data) {
    return request({
        url: recordBasePath + "/registRecords",
        method: "post",
        data: data
    });
}

export function getDiagPage(data) {
    return request({
        url: recordBasePath + "/diagRecords",
        method: "post",
        data: data
    });
}

export function selectRegist(data) {
    return request({
        url: recordBasePath + "/selectRegist",
        method: "post",
        data: data
    });
}
export function selectDiag(data) {
    return request({
        url: recordBasePath + "/selectDiag",
        method: "post",
        data: data
    });
}
export function getDisease() {
    return request({
        url: recordBasePath + "/getDisease",
        method: "get",
    });
}

export function updateDiag(data) {
    return request({
        url: recordBasePath + "/updateDiag",
        method: "post",
        data: data
    });
}

/*  */
export function getAllNoneDrug() {
    return request({
        url: checkBasePath + "/getNonDrug",
        method: "get",
    });
}
export function addOneND(data) {
    return request({
        url: checkBasePath + "/addOneND",
        method: "post",
        data: data
    });
}
export function getAllDrug() {
    return request({
        url: checkBasePath + "/getDrug",
        method: "get",
    });
}
export function addOneD(data) {
    return request({
        url: checkBasePath + "/addOneD",
        method: "post",
        data: data
    });
}
export function finishDiag(data) {
    return request({
        url: "/finishDiag",
        method: "post",
        // 普通参数(没有用{}包裹)用params ,否则会415 而且必须要RequestBody
        // https://blog.csdn.net/qq_35257117/article/details/89143205
        data: data
    });
}
export function getAllRecords(data) {
    return request({
        url: recordBasePath + "/allRecords",
        method: "post",
        data: data
    });
}
export function selectOldDiag(data) {
    return request({
        url: recordBasePath + "/selectOldDiag",
        method: "post",
        data: data
    });
}